package com.lab02;

public class Zelos implements Boss{
    private String name;
    private int HP;

    public Zelos() {
    }

    public Zelos(String name, int HP) {
        this.name = name;
        this.HP = HP;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHP() {
        return HP;
    }

    public void setHP(int HP) {
        this.HP = HP;
    }

    @Override
    public void attack() {
        System.out.println("Zelos发动了攻击");
    }

    @Override
    public void shift() {
        System.out.println("Zelos进行了飞行移动");
    }

    public void blood() {
        while (HP > 0) {
            if (HP >= 10) {
                System.out.println("受到攻击-25");
                HP = HP - 25;
                System.out.println("生命剩余值:"+HP);

            }
            if (HP > 0 && HP < 10) {
                HP += 30;
                System.out.println("生命低于10  +30");
                System.out.println("生命剩余值:"+HP);
            }
            if (HP <= 30) {
                HP-=25;
                System.out.println("受到攻击-25");
                System.out.println("生命剩余值:"+HP);
                System.out.println("很遗憾您已死亡");

                break;
            }
        }
    }

}
